package com.ctshk.rpc.payment.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.payment.dto
 * @Author: hef
 * @CreateTime: 2021-04-26 10:57
 * @Description: 描述
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class MasterCardPayConfig implements Serializable {
    /**
     * 商户id
     */
    private String merchantId;
    /**
     * 商户名称
     */
    private String merchantName;
    /**
     * Api密码
     */
    private String apiPassword;
    /**
     * Api基本地址
     */
    private String apiBaseURL;
    /**
     * Api版本
     */
    private int apiVersion;
    /**
     * 网关地址
     */
    private String gatewayHost;
    /**
     * api用户名
     */
    private String apiUsername;
    /**
     * 回调地址
     */
    private String notifyUrl;
    /**
     * 通知秘钥
     */
    private String webhooksNotificationSecret;

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
        this.apiUsername = "merchant." + merchantId;
    }
}
